<template>
  <div id="app">
    <h1>Vue Router中响应路由参数变化</h1>
    <router-link to="/">首页</router-link> |
    <router-link to="/user/1">用户1</router-link> |
    <router-link to="/user/2">用户2</router-link> 
    <router-view :key="$route.params.id"></router-view>
  </div>
</template>

<script>
export default {

}
</script>

<style>
#app {
  text-align: center;
}
</style>